package com.yisoo.ubag.product.feign;

import com.yisoo.common.to.DevSimpleDataTo;
import com.yisoo.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


@FeignClient("ubag-iot")
public interface IotFeignService {

    @GetMapping("/iot/prod/add/{cid}/{pname}")
    R Add(@PathVariable("cid")Long cid, @PathVariable("pname")String pname);


    @RequestMapping("/iot/device/add/{cid}")
    R addDev(@PathVariable("cid")Long cid, @RequestBody List<DevSimpleDataTo> datas);
}
